home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJLGR106.ARJ / SETMODE.S < prev    next >
Text File  |  1991-03-10  |  1KB  |  53 lines

  1. /* This is file _INIT.S */
  2. /*
  3. ** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  4. **
  5. ** This file is distributed under the terms listed in the document
  6. ** "copying.dj", available from DJ Delorie at the address above.
  7. ** A copy of "copying.dj" should accompany this file; if not, a copy
  8. ** should be available from where this file was obtained.  This file
  9. ** may not be distributed without a verbatim copy of "copying.dj".
  10. **
  11. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  12. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14.  
  15.     .data
  16.     .globl    __GrCurMode
  17.     .comm    __GrCurMode,4
  18.     .globl    __GrSetModeHook
  19.     .comm    __GrSetModeHook,4
  20.  
  21.     .text
  22.     .globl    _GrSetMode
  23. _GrSetMode:
  24.     push    %ebp
  25.     movl    %esp,%ebp
  26.     pushl    %ebx
  27.  
  28.     movl    8(%ebp),%eax
  29.     movl    %eax,__GrCurMode
  30.     movb    $0xff,%ah
  31.     movl    12(%ebp),%ecx
  32.     movl    16(%ebp),%edx
  33.  
  34.     int    $0x10
  35.  
  36.     movl    %ecx,__GrSizeX
  37.     movl    %edx,__GrSizeY
  38.     decl    %ecx
  39.     decl    %edx
  40.     movl    %ecx,__GrMaxX
  41.     movl    %edx,__GrMaxY
  42.     movl    %ebx,__GrCanBcopyInBlit
  43.  
  44.     call    _GrRefreshColors
  45.     cmpl    $0,__GrSetModeHook
  46.     je    L1
  47.     call    *__GrSetModeHook
  48. L1:
  49.  
  50.     popl    %ebx
  51.     popl    %ebp
  52.     ret
  53.